﻿<aside class="collapse d-md-block bg-light shadow-sm" id="sidebar" style="width: 220px; min-height: calc(100vh - 56px);">
    <nav class="flex-column p-3">
        <ul class="nav flex-column">
            <!-- 首页（补全图标） -->
            <li class="nav-item">
                <a class="nav-link"
                   href="@Url.Action("Index", "Home")"
                   data-url="@Url.Action("Index", "Home")"
                   data-menu-id="home">
                    <i class="bi bi-house-door me-2"></i>首页
                </a>
            </li>

            <!-- 货品管理（补全图标+箭头右对齐） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#goodsManage"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-box-seam me-2"></i>货品管理
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="goodsManage">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "Goods")"
                               data-menu-id="goods-index">
                                货品信息
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "GoodsType")"
                               data-menu-id="goods-type">
                                货品类型
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 出入库管理（补全图标+箭头右对齐，子项路由已规范） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#stockManage"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-arrow-left-right me-2"></i>出入库管理
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="stockManage">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "StockIn")"
                               data-menu-id="stock-in">
                                入库管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "OutboundManagement")"
                               data-menu-id="stock-out">
                                出库管理
                            </a>
                        </li>
                        
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "InventoryCheck")"
                               data-menu-id="stock-out">
                                库存盘点
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "TransferOrder")"
                               data-menu-id="stock-transfer">
                                库存调拨
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 订单管理（补全图标+箭头右对齐，路由规范） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#orderMange"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-cart me-2"></i>订单管理
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="orderMange">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "PurchaseOrder")"
                               data-menu-id="order-purchase">
                                进货订单
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseReturn", "Order")"
                               data-menu-id="order-purchase-return">
                                进货退货
                            </a>
                        </li>
                        @* <li class="nav-item"> *@
                        @*     <a class="nav-link" *@
                        @*        href="@Url.Action("Index", "SalesOrder")" *@
                        @*        data-url="@Url.Action("Index", "SalesOrder")" *@
                        @*        data-menu-id="order-sales"> *@
                        @*         销售订单 *@
                        @*     </a> *@
                        @* </li> *@
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "SalesOrder")"
                               data-menu-id="order-sales">
                                销售订单
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesReturn", "Order")"
                               data-menu-id="order-sales-return">
                                销售退货
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseStats", "Order")"
                               data-menu-id="order-purchase-stats">
                                进货统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                销售统计
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 往来单位（补全图标+箭头右对齐，修正重复data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#businessContacts"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-people me-2"></i>往来单位
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="businessContacts">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "Supplier")"
                               data-menu-id="supplier-index">
                                供应商管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "CustomerManagement")"
                               data-menu-id="customer-index">
                                客户管理
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 统计报表（补全图标+箭头右对齐，规范路由和data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#statisticalReport"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-bar-chart me-2"></i>统计报表
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="statisticalReport">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockFlow", "Stats")"
                               data-menu-id="stats-stock-flow">
                                出入库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockInFlow", "Stats")"
                               data-menu-id="stats-stock-in-flow">
                                入库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockOutFlow", "Stats")"
                               data-menu-id="stats-stock-out-flow">
                                出库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("CheckStats", "Stats")"
                               data-menu-id="stats-check">
                                盘点统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("TransferStats", "Stats")"
                               data-menu-id="stats-transfer">
                                调拨统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockDistribution", "Stats")"
                               data-menu-id="stats-distribution">
                                库存分布
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockSummary", "Stats")"
                               data-menu-id="stats-summary">
                                库存汇总
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockTypeSummary", "Stats")"
                               data-menu-id="stats-type-summary">
                                出入库类型汇总
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 台账（补全图标+箭头右对齐，规范路由和data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#ledger"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-book me-2"></i>台账
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="ledger">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockQuery", "Ledger")"
                               data-menu-id="ledger-stock-query">
                                库存查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("ExpiryQuery", "Ledger")"
                               data-menu-id="ledger-expiry-query">
                                保质期查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("BatchQuery", "Ledger")"
                               data-menu-id="ledger-batch-query">
                                批次查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockAlert", "Ledger")"
                               data-menu-id="ledger-stock-alert">
                                库存预警
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 仓库管理（补全图标） -->
            <li class="nav-item">
                <a class="nav-link"
                   href="javascript:;"
                   data-url="@Url.Action("Index", "Warehouse")"
                   data-menu-id="warehouse">
                    <i class="bi bi-warehouse me-2"></i>仓库管理
                </a>
            </li>

            <!-- 系统消息（补全图标） -->
            <li class="nav-item">
                <a class="nav-link"
                   href="javascript:;"
                   data-url="@Url.Action("Index", "Message")"
                   data-menu-id="message">
                    <i class="bi bi-bell me-2"></i>系统消息
                </a>
            </li>

            <!-- 组织管理（补全图标+箭头右对齐，规范路由和data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#organizationalManagement"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-sitemap me-2"></i>组织管理
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="organizationalManagement">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Organization", "Org")"
                               data-menu-id="org-organization">
                                组织机构
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Position", "Org")"
                               data-menu-id="org-position">
                                岗位管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("UserManage", "Org")"
                               data-menu-id="org-user">
                                用户管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("RoleManage", "Org")"
                               data-menu-id="org-role">
                                角色管理
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 系统设置（补全图标+箭头右对齐，规范路由和data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#systemSettings"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-gear me-2"></i>系统设置
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="systemSettings">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "NumberingRule")"
                               data-menu-id="settings-numbering">
                                编号规则
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SystemFields", "Settings")"
                               data-menu-id="settings-system-fields">
                                系统字段
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("UnitManage", "Settings")"
                               data-menu-id="settings-unit">
                                单位管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("ApprovalSettings", "Settings")"
                               data-menu-id="settings-approval">
                                审核设置
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockSettings", "Settings")"
                               data-menu-id="settings-stock">
                                库存设置
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockType", "Settings")"
                               data-menu-id="settings-stock-type">
                                出入库类型
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 个人设置（补全图标+箭头右对齐，规范路由和data-menu-id） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#personalProfile"
                   role="button"
                   aria-expanded="false">
                    <i class="bi bi-person me-2"></i>个人设置
                    <i class="bi bi-chevron-left arrow-icon ms-auto"></i>
                </a>
                <div class="collapse ms-3" id="personalProfile">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="@Url.Action("Profile", "User")"
                               data-url="@Url.Action("Profile", "User")"
                               data-menu-id="user-profile">
                                个人资料
                            </a>
                        </li>
                        
                    </ul>
                </div>
            </li>
        </ul>
    </nav>
</aside>